<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片列表</title>
<include file="Public/header" />
<script type="text/javascript">
$(function(){
    $("#checkall").on('click',function(){
      var inputs=$(this).parents('.list_vmall_bort').find('input');
      $(this).attr('checked') ? inputs.attr('checked','checked') : inputs.removeAttr('checked');
    })
    $("#send_message").on('click',function(){
       var len=$('input[name="user_id[]"]:checked').length;
       if(len==0){
          alert('请至少选择一项'); return false;
       } 
       $('input').attr('disabled','disabled');
       $("#send-message").show();
   })
   $(".colse,.title span").live('click',function(){
      $('input').removeAttr('disabled');
      $(".add-form").hide();
      $('.notice').hide();
   })
   $("#form2").submit(function(){
      var content=$('textarea[name="content"]').val();
      if(content==''){
         alert('请输入消息内容');
         $('textarea[name="content"]').focus();
         return false;
      }
      var ids=[];
      $('input[name="user_id[]"]:checked').each(function(){
         ids.push($(this).val());
      })
      $(".add-form").hide();
      // $('.notice').show(); 
      
      $.post('<{:U('send_message')}>',{ids:ids,content:content},function(res){
          alert('发送成功！');
          window.location.reload();
      })
      return false;
   })
})
</script>
</head>
<body>
 
    
 
        <div class="list_vmall_man">
        	<div class="list_vmall_le">
            	<!-- <p class="list_vmall_bin"><a href="<{:U('level')}>" target="_black">会员等级管理</a></p> -->
               

              
                  <include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
               
            </div>
            <div class="list_vmall_rig">
            	<div class="list_vmall_bort">
                	<table width="100%" border="1" cellspacing="1" cellpadding="1">
                      <tr>
                        <form action="<{:U('index')}>" method="get">
                        <td style="width:334px" height="46"><input type="text" name="kw" style="margin-left:5px;" value="<{$_REQUEST['kw']}>" placeholder="用户名/昵称" /><input type="submit" value="搜索" style="margin-left:4px; height:26px; color:#333" class="btn" /></td>
                        </form>
                      
                      </tr>
                    </table>
					<table width="100%" class="v_am_bor_t v_am_td" border="1" cellspacing="1" cellpadding="1">
                      <tr class="v_am_bg_top" height="30">
                        <td height="34" align="center" valign="middle" class="v_am_font"><input type="checkbox" id="checkall"></td>
                        <td height="34" align="center" valign="middle" class="v_am_font">ID</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">用户名</td>
                       <td height="34" align="center" valign="middle" class="v_am_font">手机号</td>
					    <td height="34" align="center" valign="middle" class="v_am_font">邮箱</td> 
					  <td height="34" align="center" valign="middle" class="v_am_font">昵称</td> 
                        <td height="34" align="center" valign="middle" class="v_am_font">注册时间</td>
                       <!-- <td height="34" align="center" valign="middle" class="v_am_font">最后登录时间</td>-->

                        <td height="34" align="center" valign="middle" class="v_am_font">积分</td>
						 <td height="34" align="center" valign="middle" class="v_am_font">钱包</td> 
                       <!-- <td height="34" align="center" valign="middle" class="v_am_font">公司名称</td>-->
                         
						
                        <td height="34" align="center" valign="middle" class="v_am_font" style="border-right:0;">操作</td>
                      </tr>
                     <volist name="data" id="vo">
                      <tr>
                      
                        <td height="34" align="center" valign="middle" class="v_am_font"><input type="checkbox" name="user_id[]" value="<{$vo.user_id}>"></td>

                      
                        <td height="36" align="center" valign="middle"><{$vo.user_id}></td>
                        <td height="36" align="center" valign="middle"><{$vo.user_name}></td>
						  <td height="36" align="center" valign="middle"><{$vo.phone}></td> 
						   <td height="36" align="center" valign="middle"><{$vo.email}></td> 
                         <td height="36" align="center" valign="middle"><{$vo.nickname}></td> 
                        <td height="36" align="center" valign="middle"><{$vo.reg_time|date='Y-m-d H:i', ###}></td>
                       <!-- <td height="36" align="center" valign="middle"><{$vo.last_login|date='Y-m-d H:i', ###}></td>-->

                         <td height="36" align="center" valign="middle"><{$vo.integral}></td> 
						 <td height="36" align="center" valign="middle"><{$vo.money}></td>  
                         
                       	 
                        <td style="border-right:0;"  height="36" align="center" valign="middle">
                          
                            <if condition="$vo.forbidden eq 0">
                        	<a  href="<{:U('lock',array('id'=> $vo['user_id'],'p'=>I('p')))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;禁用</a>
                            <elseif condition="$vo.forbidden eq 1" />
                            <a  href="<{:U('recover',array('id'=> $vo['user_id'],'p'=>I('p')))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;恢复</a>
                            </if>
                            <a  href="<{:U('add',array('id'=> $vo['user_id']))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;编辑</a>
                            <a onclick=" return confirm('确认要删除吗？')" href="<{:U('delete',array('id'=> $vo['user_id']))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;删除</a>   
                           
                        </td>
                      </tr>
                      </volist>  
                    
                    </table>
					
                   <include file="./Apps/BoxAdmin/View/Ace/Public/pager.html" />

                
                </div>
            </div>
       
        
    </div>


    <div id="send-message" class="add-form">
        <div class="title">发送系统消息<span>×</span></div>
        <form id="form2">
            <div class="s">
               <textarea name="content"></textarea>
            </div>
            <button class="v_mall_q_1 yes" type="submit" style="border:0; height:32px; padding-top:0; cursor:pointer;">确  定</button>
             <button class="v_mall_q_1 colse" type="button" style="border:0; height:32px; padding-top:0; cursor:pointer;background: #C0C0C0;">取　消</button>
        </form>

    </div>


    <div class="notice">
        <div class="title">发送状态<span>×</span></div>
    </div>
 
</body>
</html>
